luci-app-adblock: sync with adblock 4.4.5-1
authorDirk Brenken <[email protected]>
Sun, 14 Dec 2025 06:11:19 +0000 (07:11 +0100)
committerDirk Brenken <[email protected]>
Sun, 14 Dec 2025 06:11:39 +0000 (07:11 +0100)
Signed-off-by: Dirk Brenken <[email protected]>
applications/luci-app-adblock/Makefile
applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/feeds.js
applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/logtemplate.js

index 1686030db9ba73770993fea2aead856d474a238b..21d0f5cf96bd7931e9ba52371812a36356268751 100644 (file)
@@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk
 LUCI_TITLE:=LuCI support for Adblock
 LUCI_DEPENDS:=+luci-base +adblock
 
-PKG_VERSION:=4.4.4
-PKG_RELEASE:=2
+PKG_VERSION:=4.4.5
+PKG_RELEASE:=1
 PKG_LICENSE:=Apache-2.0
 PKG_MAINTAINER:=Dirk Brenken <[email protected]>
 
index f2410bf29cc826e302c3e845fd07de757bdf2537..06c5fe094548714d5a64adb21a9c39b08807d095 100644 (file)
@@ -215,11 +215,10 @@ return view.extend({
                        }
 
                        o = s.option(form.Value, 'rule', _('Rule'));
-                       o.value('/^(([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($1)}', _('<DOMAIN> excl. TLDs'));
-                       o.value('/^(([[:alnum:]_-]{1,63}\\.)*[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($1)}', _('<DOMAIN> incl. TLDs'));
-                       o.value('/^(127\\.0\\.0\\.1 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($2)}', _('127.0.0.1<SPACE><DOMAIN>'));
-                       o.value('/^(0\\.0\\.0\\.0 ([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}([[:space:]]|$))/{print tolower($2)}', _('0.0.0.0<SPACE><DOMAIN>'));
-                       o.value('BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]{1,63}\\.)+[[:alpha:]][[:alnum:]-]{1,62}\\^(\\$third-party)?$/{print tolower($3)}', _('<ADBLOCK-PLUS>'));
+                       o.value('feed 1', _('<Domain>'));
+                       o.value('feed 127.0.0.1 2', _('127.0.0.1 <Domain>'));
+                       o.value('feed 0.0.0.0 2', _('0.0.0.0 <Domain>'));
+                       o.value('feed 3 [|^]', _('<Adblock Plus Syntax>'));
                        o.optional = true;
                        o.rmempty = true;
 
index 10c552721f3fee1f2134633f4305b07070cd33b6..c26aa23bbdff91d61c2cd09f7c91d17a58e070f6 100644 (file)
@@ -18,25 +18,24 @@ function Logview(logtag, name) {
                                        const logEl = document.getElementById('logfile');
                                        if (!logEl) return;
 
-                                       const entries = res?.log ?? [];
-                                       if (entries.length > 0) {
-                                               const filtered = entries
-                                                       .filter(entry => !logtag || entry.msg.includes(logtag))
-                                                       .map(entry => {
-                                                               const d = new Date(entry.time);
-                                                               const date = d.toLocaleDateString([], {
-                                                                       year: 'numeric',
-                                                                       month: '2-digit',
-                                                                       day: '2-digit'
-                                                               });
-                                                               const time = d.toLocaleTimeString([], {
-                                                                       hour: '2-digit',
-                                                                       minute: '2-digit',
-                                                                       second: '2-digit',
-                                                                       hour12: false
-                                                               });
-                                                               return `[${date}-${time}] ${entry.msg}`;
-                                                       });
+                                       const filtered = (res?.log ?? [])
+                                       .filter(entry => !logtag || entry.msg.includes(logtag))
+                                       .map(entry => {
+                                               const d = new Date(entry.time);
+                                               const date = d.toLocaleDateString([], {
+                                                       year: 'numeric',
+                                                       month: '2-digit',
+                                                       day: '2-digit'
+                                               });
+                                               const time = d.toLocaleTimeString([], {
+                                                       hour: '2-digit',
+                                                       minute: '2-digit',
+                                                       second: '2-digit',
+                                                       hour12: false
+                                               });
+                                               return `[${date}-${time}] ${entry.msg}`;
+                                       });
+                                       if (filtered.length > 0) {
                                                logEl.value = filtered.join('\n');
                                        } else {
                                                logEl.value = _('No %s related logs yet!').format(name);